package com.lq.educationsystem.teacher.controller;

import com.lq.educationsystem.common.util.Result;
import com.lq.educationsystem.teacher.entiy.TeacherTb;
import com.lq.educationsystem.teacher.service.TeacherService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "教师数据修改")
@RequestMapping("/teacher")
@RestController
public class TeacherController {
    @Autowired
    TeacherService teacherService;

    //登录功能
    @Operation(summary = "教师登录功能")
    @PostMapping("/login")
    public Result<TeacherTb> teacherLogin(@RequestBody TeacherTb teacherInfo) {

        //登录功能
        Result<TeacherTb> teacherLoginResult =teacherService.teacherLogin(teacherInfo);

        return teacherLoginResult;
    }

    //

}
